/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.csvgenerator.engine.vr;

import com.csvgenerator.engine.value.ValueProducer;

/**
 *
 * @author Administrator
 */
public class SimpleValueReferencer extends ValueReferencer {
    private ValueProducer producerReference;
    private String prefix = "";    
    private String suffix = "";
    
    @Override
    public String nextValue() {
        String nextValue = prefix + (new StringBuilder(producerReference.getCurrentValue())).toString() + suffix;                
        currentValue = nextValue;
        return nextValue;
    }

    public ValueProducer getProducerReference() {
        return producerReference;
    }

    public void setProducerReference(ValueProducer producerReference) {
        this.producerReference = producerReference;
    }        
    
    public String getPrefix() {
        return prefix;
    }

    public void setPrefix(String prefix) {
        this.prefix = prefix;
    }

    public String getSuffix() {
        return suffix;
    }

    public void setSuffix(String suffix) {
        this.suffix = suffix;
    }
}
